package com.cetc39.service.impl;

import java.util.List;

import com.cetc39.bean.Device;
import com.cetc39.dao.DeviceDao;
import com.cetc39.service.DeviceService;

public class DeviceServiceImpl implements DeviceService {

	private DeviceDao deviceDao;
	
	@Override
	public void addDev(Device dev) {
		deviceDao.saveDev(dev);
	}

	@Override
	public void updateDev(Device dev) {
		deviceDao.updateDev(dev);
	}

	@Override
	public List<?> findAllDev() {
		List<?> devList = deviceDao.findAllDev();
		return devList;
	}

	@Override
	public Device findByDevId(int id) {
		Device dev = deviceDao.findByDevId(id);
		return dev;
	}

	public void setDeviceDao(DeviceDao deviceDao) {
		this.deviceDao = deviceDao;
	}

}
